
package main;

import java.util.Arrays;
import java.util.Scanner;

class Rectangle{
	private int width;
	private int length;
	public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public String toString(){
		return ("Rectangle [width="+this.width+", length="+this.length+"]");
	}
	public int getPerimeter(){
		return 2*(this.length+this.width);
	}
	public int getArea(){
		return (this.length*this.width);
	}
}

class Circle{
	private int radius;
	public Circle(int radius){
		this.radius=radius;
	}
	public int getPerimeter(){
		return (int) (2*Math.PI*this.radius);
	}
	public int getArea(){
		return (int) (Math.PI*this.radius*this.radius);
	}
	public int getRadius() {
		return radius;
	}
	public void setRadius(int radius) {
		this.radius = radius;
	}
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	
}

public class test {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc=new Scanner(System.in);
		Rectangle[] rectangle=new Rectangle[2];
		Circle[] circle=new Circle[2];
		int area=0,perimeter=0;
		for(int i=0;i<2;i++){
			rectangle[i]=new Rectangle(sc.nextInt(),sc.nextInt());
		}
		for (int i=0;i<2;i++){
			circle[i]=new Circle(sc.nextInt());
		}
		for(int i=0;i<2;i++){
			area=rectangle[i].getArea()+circle[i].getArea()+area;
			perimeter=rectangle[i].getPerimeter()+circle[i].getPerimeter()+perimeter;
		}
		System.out.println(perimeter);
		System.out.println(area);
		System.out.println(Arrays.deepToString(rectangle));
		System.out.println(Arrays.deepToString(circle));
		sc.close();
	}

}



